# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=kernel-hardening-checker
pkgver=0.6.1_git20231018
_commit=0945ed918e4c1278691b491f9dde8b2ba398e401
pkgrel=0
pkgdesc="A tool for checking the security hardening options of the Linux kernel"
options="!check" # no test suite
url="https://github.com/a13xp0p0v/kernel-hardening-checker"
arch="all"
license="GPL-3.0-or-later"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
provides="kconfig-hardened-check=$pkgver-r$pkgrel" # Backwards compatibility
source="$pkgname-$pkgver.tar.gz::https://github.com/a13xp0p0v/kernel-hardening-checker/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
eea598b3caabb87f019d896d48ec8c7df3084fc5a8b23bd37c42be3533a0df3420954d0075e9095c2ee02d8e09c0684f7c1feb09bab74391ac90af9729772c84  kernel-hardening-checker-0.6.1_git20231018.tar.gz
"
